home *** CD-ROM | disk | FTP | other *** search
- /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Copyright (C) 1994, by WATCOM International Inc. All rights %
- % reserved. No part of this software may be reproduced or %
- % used in any form or by any means - graphic, electronic or %
- % mechanical, including photocopying, recording, taping or %
- % information storage and retrieval systems - except with the %
- % written permission of WATCOM International Inc. %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- */
-
- /*************************************************************************
- *
- * WResourceID --
- *
- *************************************************************************/
-
- #ifndef _WRESID_HPP_INCLUDED
- #define _WRESID_HPP_INCLUDED
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma pack(push,8);
- #pragma enum int;
- #endif
-
- #ifndef _WOBJECT_HPP_INCLUDED
- # include "wobject.hpp"
- #endif
- #ifndef _WARRAY_HPP_INCLUDED
- # include "warray.hpp"
- #endif
-
- class WCMCLASS WResourceID : public WObject {
- WDeclareSubclass( WResourceID, WObject );
-
- public:
-
- /*********************************************************
- * Constructors and destructors
- *********************************************************/
-
- WResourceID( WInt id=0 );
- WResourceID( const WChar *nm );
- WResourceID( const WResourceID & id );
-
- ~WResourceID();
-
- /*********************************************************
- * Properties
- *********************************************************/
-
- // ID
-
- const WChar * GetID() const { return _resID; }
-
- // IDAsInt
-
- WInt GetIDAsInt() const { return (WInt) _resID; }
-
- /*********************************************************
- * Methods
- *********************************************************/
-
- // Clear
-
- void Clear();
-
- // Create
-
- WBool Create( WInt number );
- WBool Create( const WChar *name );
- WBool Create( const WResourceID & id );
-
- /*********************************************************
- * Operators
- *********************************************************/
-
- WResourceID & operator=( const WResourceID & resId )
- { Create( resId ); return *this; }
-
- WResourceID & operator=( const WInt id )
- { Create( id ); return *this; }
-
- WResourceID & operator=( const WChar * name )
- { Create( name ); return *this; }
-
- operator WInt() const { return GetIDAsInt(); }
-
- /*********************************************************
- * Data members
- *********************************************************/
-
- private:
- WChar *_resID;
- };
-
- extern template WArrayReference<WResourceID>;
- extern template WArray<WResourceID>;
- typedef WArray<WResourceID> WResourceIDArray;
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma enum pop;
- #pragma pack(pop);
- #endif
-
- #endif // _WRESID_HPP_INCLUDED
-